
import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import Antd from 'ant-design-vue';
import router from './router'
import '@/assets/init.css'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import aIcon from '@/components/aIcon/index.vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN'; // 引入中文语言包
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
import Echarts from 'vue-echarts'
import * as echarts from 'echarts'

dayjs.locale('zh-cn');

const app = createApp(App)
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(router)
app.use(Antd)
app.component('a-icon', aIcon)
// 全局提供中文语言配置
app.provide('locale', zhCN); 
// 使用组件
app.component('e-charts',Echarts)
// 全局挂载 echarts
app.config.globalProperties.$echarts = echarts
app.mount('#app')
